const mongoose = require("mongoose");
//2.创建当前数据库的某个集合的约束对象
const adminSchema = new mongoose.Schema({
  adminName: {
    type: String,
    unique: true,
    required: true
  },
  passWord: {
    type: String,
    required: true
  },
  regTime: {
    type: String,
    required: true
  },
  loginTime: {
    type: String,
    required: true,
    default:"----"
  },
  status:{
    type:String,
    require: true,
    default: 0
  }
});

//3.根据某个约束对象,去创建某个集合
const adminModel = mongoose.model("adminList", adminSchema);

module.exports = adminModel;
